package com.glorysoft.xztpda.entity;

import androidx.databinding.BaseObservable;
import androidx.databinding.Bindable;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * FileName: ChangeShiftEntity
 * Author: XJH
 * Date: 2020/7/1 19:52
 * Description:
 * History:
 */
public class ChangeShiftEntity extends BaseObservable implements Serializable {
  private String ITEMID;

  private String COMMENTS;

  private String RESERVED01;

  private String RESERVED02; //批次数量

  private String RESERVED03;//设备编号

  private String RESERVED04;//批次状态

  private String RESERVED05;

  private String RESERVED06;

  private String DOCID;//交班订号

  private String REFER_OWNER;//交班人

  private String REFER_TIME;//交班时间

  private String TO_OWNER;//接班人

  private String TO_TIME;//接班时间

  private String MAIN_QTY;//主数量

  private String SUBQTY;//子数量

  private String ISLAST;//是否为最后一次交接
  private String OBJECT_TYPE;

  private ChangeShift CHANGESHIFT;

  private String QTY;
  private String LOT_ID;
  private String STEP_NAME;
  private String ACTION_QTY;
  private String REMAIN_QTY;
  private String EQUIPMENT_ID;
  private int SUMSTEPQTY;

  private List<ChangeShift> CHANGESHIFTLINELIST;
  private List<ChangeShiftEntity> XCHANGESHIFTLIST;


  public ChangeShiftEntity(String ITEMID, String MAINQTY, String RESERVED03, String RESERVED04) {
    this.LOT_ID = ITEMID;
    this.MAIN_QTY = MAINQTY;
    this.EQUIPMENT_ID = RESERVED03;
    this.STEP_NAME = RESERVED04;
  }


  public int getSUMSTEPQTY() {
    return SUMSTEPQTY;
  }

  public void setSUMSTEPQTY(int SUMSTEPQTY) {
    this.SUMSTEPQTY = SUMSTEPQTY;
  }

  public String getREFER_OWNER() {
    return REFER_OWNER == null ? "" : REFER_OWNER;
  }

  public void setREFER_OWNER(String REFER_OWNER) {
    this.REFER_OWNER = REFER_OWNER;
  }

  public String getREFER_TIME() {
    return REFER_TIME == null ? "" : REFER_TIME;
  }

  public void setREFER_TIME(String REFER_TIME) {
    this.REFER_TIME = REFER_TIME;
  }

  public String getTO_OWNER() {
    return TO_OWNER == null ? "" : TO_OWNER;
  }

  public void setTO_OWNER(String TO_OWNER) {
    this.TO_OWNER = TO_OWNER;
  }

  public String getTO_TIME() {
    return TO_TIME == null ? "" : TO_TIME;
  }

  public void setTO_TIME(String TO_TIME) {
    this.TO_TIME = TO_TIME;
  }

  public String getMAIN_QTY() {
    return MAIN_QTY == null ? "0" : MAIN_QTY;
  }

  public void setMAIN_QTY(String MAIN_QTY) {
    this.MAIN_QTY = MAIN_QTY;
  }

  public String getLOT_ID() {
    return LOT_ID == null ? "" : LOT_ID;
  }

  public void setLOT_ID(String LOT_ID) {
    this.LOT_ID = LOT_ID;
  }

  public String getSTEP_NAME() {
    return STEP_NAME == null ? "" : STEP_NAME;
  }

  public void setSTEP_NAME(String STEP_NAME) {
    this.STEP_NAME = STEP_NAME;
  }

  public String getACTION_QTY() {
    return ACTION_QTY == null ? "" : ACTION_QTY;
  }

  public void setACTION_QTY(String ACTION_QTY) {
    this.ACTION_QTY = ACTION_QTY;
  }

  @Bindable
  public String getREMAIN_QTY() {
    return REMAIN_QTY == null ? "0" : REMAIN_QTY;
  }

  public void setREMAIN_QTY(String REMAIN_QTY) {
    this.REMAIN_QTY = REMAIN_QTY;
    notifyChange();
  }

  public String getEQUIPMENT_ID() {
    return EQUIPMENT_ID == null ? "" : EQUIPMENT_ID;
  }

  public void setEQUIPMENT_ID(String EQUIPMENT_ID) {
    this.EQUIPMENT_ID = EQUIPMENT_ID;
  }

  public String getQTY() {
    return QTY == null ? "0" : QTY;
  }

  public void setQTY(String QTY) {
    this.QTY = QTY;
  }

  public String getOBJECT_TYPE() {
    return OBJECT_TYPE == null ? "" : OBJECT_TYPE;
  }

  public void setOBJECT_TYPE(String OBJECT_TYPE) {
    this.OBJECT_TYPE = OBJECT_TYPE;
  }

  public List<ChangeShiftEntity> getXCHANGESHIFTLIST() {
    if (XCHANGESHIFTLIST == null) {
      return new ArrayList<>();
    }
    return XCHANGESHIFTLIST;
  }

  public void setXCHANGESHIFTLIST(List<ChangeShiftEntity> XCHANGESHIFTLIST) {
    this.XCHANGESHIFTLIST = XCHANGESHIFTLIST;
  }

  public String getRESERVED06() {
    return RESERVED06 == null ? "" : RESERVED06;
  }

  public void setRESERVED06(String RESERVED06) {
    this.RESERVED06 = RESERVED06;
  }

  public String getDOCID() {
    return DOCID == null ? "" : DOCID;
  }

  public void setDOCID(String DOCID) {
    this.DOCID = DOCID;
  }

  public String getSUBQTY() {
    return SUBQTY == null ? "" : SUBQTY;
  }

  public void setSUBQTY(String SUBQTY) {
    this.SUBQTY = SUBQTY;
  }

  public String getISLAST() {
    return ISLAST == null ? "" : ISLAST;
  }

  public void setISLAST(String ISLAST) {
    this.ISLAST = ISLAST;
  }

  public List<ChangeShift> getCHANGESHIFTLINELIST() {
    if (CHANGESHIFTLINELIST == null) {
      return new ArrayList<>();
    }
    return CHANGESHIFTLINELIST;
  }

  public void setCHANGESHIFTLINELIST(List<ChangeShift> CHANGESHIFTLINELIST) {
    this.CHANGESHIFTLINELIST = CHANGESHIFTLINELIST;
  }

  @Bindable
  public String getRESERVED02() {
    return RESERVED02 == null ? "" : RESERVED02;
  }

  public void setRESERVED02(String RESERVED02) {
    this.RESERVED02 = RESERVED02;
    notifyChange();
  }

  public String getRESERVED03() {
    return RESERVED03 == null ? "" : RESERVED03;
  }

  public void setRESERVED03(String RESERVED03) {
    this.RESERVED03 = RESERVED03;
  }

  public String getRESERVED04() {
    return RESERVED04 == null ? "" : RESERVED04;
  }

  public void setRESERVED04(String RESERVED04) {
    this.RESERVED04 = RESERVED04;
  }

  public String getRESERVED05() {
    return RESERVED05 == null ? "" : RESERVED05;
  }

  public void setRESERVED05(String RESERVED05) {
    this.RESERVED05 = RESERVED05;
  }

  public ChangeShift getCHANGESHIFT() {
    return CHANGESHIFT == null ? new ChangeShift() : CHANGESHIFT;
  }

  public void setCHANGESHIFT(ChangeShift CHANGESHIFT) {
    this.CHANGESHIFT = CHANGESHIFT;
  }

  public String getITEMID() {
    return ITEMID == null ? "" : ITEMID;
  }

  public void setITEMID(String ITEMID) {
    this.ITEMID = ITEMID;
  }

  public String getCOMMENTS() {
    return COMMENTS == null ? "" : COMMENTS;
  }

  public void setCOMMENTS(String COMMENTS) {
    this.COMMENTS = COMMENTS;
  }

  @Bindable
  public String getRESERVED01() {
    return RESERVED01 == null ? "" : RESERVED01;
  }

  public void setRESERVED01(String RESERVED01) {
    this.RESERVED01 = RESERVED01;
    notifyChange();
  }

  public class ChangeShift implements Serializable{
    // 交接班主键RRN
    private String CHANGESHIFTRRN;
    // 交接班ID
    private String CHANGESHIFTID;

    private String TYPE;//类型

    private String ITEMID;

    private String RESERVED01;

    private String RESERVED02;

    private String RESERVED03;

    private String RESERVED04;

    private String COMMENTS;

    private String RESERVED05;

    private String RESERVED06;

    private String OBJECT_TYPE;

    private String MAINQTY;

    private String OBJECTRRN;


    public String getOBJECTRRN() {
      return OBJECTRRN == null ? "" : OBJECTRRN;
    }

    public void setOBJECTRRN(String OBJECTRRN) {
      this.OBJECTRRN = OBJECTRRN;
    }

    public String getMAINQTY() {
      return MAINQTY == null ? "" : MAINQTY;
    }

    public void setMAINQTY(String MAINQTY) {
      this.MAINQTY = MAINQTY;
    }

    public String getOBJECT_TYPE() {
      return OBJECT_TYPE == null ? "" : OBJECT_TYPE;
    }

    public void setOBJECT_TYPE(String OBJECT_TYPE) {
      this.OBJECT_TYPE = OBJECT_TYPE;
    }

    public String getCHANGESHIFTRRN() {
      return CHANGESHIFTRRN == null ? "" : CHANGESHIFTRRN;
    }

    public void setCHANGESHIFTRRN(String CHANGESHIFTRRN) {
      this.CHANGESHIFTRRN = CHANGESHIFTRRN;
    }

    public String getCHANGESHIFTID() {
      return CHANGESHIFTID == null ? "" : CHANGESHIFTID;
    }

    public void setCHANGESHIFTID(String CHANGESHIFTID) {
      this.CHANGESHIFTID = CHANGESHIFTID;
    }

    public String getTYPE() {
      return TYPE == null ? "" : TYPE;
    }

    public void setTYPE(String TYPE) {
      this.TYPE = TYPE;
    }

    public String getITEMID() {
      return ITEMID == null ? "" : ITEMID;
    }

    public void setITEMID(String ITEMID) {
      this.ITEMID = ITEMID;
    }

    public String getRESERVED06() {
      return RESERVED06 == null ? "" : RESERVED06;
    }

    public void setRESERVED06(String RESERVED06) {
      this.RESERVED06 = RESERVED06;
    }

    public String getItemId() {
      return ITEMID == null ? "" : ITEMID;
    }

    public void setItemId(String itemId) {
      this.ITEMID = itemId;
    }

    public String getRESERVED01() {
      return RESERVED01 == null ? "" : RESERVED01;
    }

    public void setRESERVED01(String RESERVED01) {
      this.RESERVED01 = RESERVED01;
    }

    public String getRESERVED02() {
      return RESERVED02 == null ? "" : RESERVED02;
    }

    public void setRESERVED02(String RESERVED02) {
      this.RESERVED02 = RESERVED02;
    }

    public String getRESERVED03() {
      return RESERVED03 == null ? "" : RESERVED03;
    }

    public void setRESERVED03(String RESERVED03) {
      this.RESERVED03 = RESERVED03;
    }

    public String getRESERVED04() {
      return RESERVED04 == null ? "" : RESERVED04;
    }

    public void setRESERVED04(String RESERVED04) {
      this.RESERVED04 = RESERVED04;
    }

    public String getCOMMENTS() {
      return COMMENTS == null ? "" : COMMENTS;
    }

    public void setCOMMENTS(String COMMENTS) {
      this.COMMENTS = COMMENTS;
    }

    public String getRESERVED05() {
      return RESERVED05 == null ? "" : RESERVED05;
    }

    public void setRESERVED05(String RESERVED05) {
      this.RESERVED05 = RESERVED05;
    }

  }
}
